• The Note and LogMSG operators can have the second parameter (like in ARA): if the value is 2 or 3, the message is shown in the LineShare panel, if the value is 1 or 3, the message is written into the LineShare Log.
LineShare 1.5
–––––––––––––––––––––––––––
• All comment lines started with "!$" are shown in the "Comment" field when the script is selected in the "Attach" dialog box.
• The parameters should be defined in the script (the previous versions had the ^2,^3 and ^4 built-in parameters only). A parameter is described with a script line starting with the parameter identifier:
n - defines the parameter ID, should a digit (from 2 to 9, the ^1 is reserved for the dialing string).
<parameter name> - the title string to be shown in the Options dialog box;
<parameter type> - one of: TEXT, BOOL, ENUM
a TEXT parameter is shown as a text field in the Options dialog box. A user can assign any string value to such a parameter;
a BOOL parameters is shown as a pair of radio buttons in the Options dialog box.
a ENUM parameters is shown as a pop-up menu in the Options dialog box.
<parameter values>- a list of valid parameter values:
this list contains elements separated with commas and enclosed with parenthesis; each element consists of two strings separated with the equal sign:
Sample: ("Never"="0","1 Ring"="1","2 Rings"="2")
for TEXT parameters this list should be omitted;
for BOOL parameters the list should contain 2 elements, the first string in each element defines the name of the radio button, the second string is assigned to the parameter if the button is selected; if the list is ommited, the default one is used:
("On"="1","Off"="0")
for ENUM parameters the list elements define pop-up menu items: the first string is used as the item text, the second string is assigned to the parameter is the item is selected.
<default value> - a string assigned to the parameter when a script is initially attached to the line.
Sample:
^5 Fax Identifier: = Text "Stalker_GmbH"
A text field titled "Fax identifier" appears is the Options dialog box. Initially the string "Stalker_GmbH" is assigned to this parameter.
A pop-up menu titled "Speaker On:" appears in the Options dialog box. It has three items: "Never","When Connecting", "Always". Selecting one of these items results in the value "0", "1", or "2" is assigned to the parameter ^2. Initially "1" is assigned.
• The wildcard combination ^$ is implemented. If met in a match string (i.e. in a MatchStr operator), this combination matches any string in the input stream:
i.e. if the input stream is:
CONNECT 9600/V42bis
and a match string is defined as:
MatchStr 1 10 "CONNECT ^$/"
then script will jump to the lable 10, and the "9600" is assigned to ^$
When used in other operators, ^$ can be used to access the substring it has just compared.
Sample:
Note "Connected at ^$bps"
• The Say command is implemented:
Say <string>
It brings up a Notification Alert Box with the <string> message.
• Variables:
you can use several (5 in this version) variables in strings. To substitute the variable content, you should write the carret sign and the variable name - a capital letter (^A,^B,^C,^D,^E).
To assign a value to a variable, use the SETVAR command:
SETVAR <variable_name> <string>
Sample: SetVar B "Normal"
Note "^B Connection Established"
This results in the "Normal Connection Established" message.
• Calculation:
Everywhere in a script, except the "@Label" lines you can use a combination:
VAL(<string>) instead of a number.
Sample:
SetVar A "96"
SetSpeed VAL("^A00")
This results in switching the serial port speed to 9600 bps.
The digits in the string can have leading and trailing spaces.
Note: it means that you can use "calculated jump" as well:
i.e. Jump Val("^A") is a legal operation.
• Error codes: LineShare now shows the error code, if an error is met when executing a script.